<template>
  <div id="app">
    <h1>{{$store.state.counter}}</h1>
    <button @click="increase">++</button>
    <button @click="decrease">--</button>
    <button @click="async">异步++</button>
    <h1>{{oddOreven}}</h1>
  </div>
</template>

<script>
import {mapActions, mapGetters} from 'vuex'

export default {
  name: 'App',
  components: {
  },
  computed: mapGetters(['oddOreven']),
  methods: mapActions([
    "increase",
    "decrease",
    "async"
  ])

}
</script>

<style>
  #app{
    text-align: center;
  }
    button{
      margin: 0 6px;
    }
</style>
